The present invention relates to digital data processing devices, and in particular to devices for manipulating digital images.
The latter half of the twentieth century has been witness to a phenomenon known as the information revolution. While the information revolution is a historical development broader in scope than any one event or machine, no single device has come to represent the information revolution more than the digital electronic computer. The development of computer systems has surely been a revolution. Each year, computer systems grow faster, store more data, and provide more applications to their users.
Early computer systems were very expensive and difficult to use, capable of being programmed and manipulated by only a handful of highly-educated specialists. The cost of operating such computers was correspondingly high, and they were therefore used for only the most essential tasks. The dynamic which has driven the information revolution is the sustained reduction in the cost of computing. Thus, information which was too expensive to gather, store and process a few years ago, is now economically feasible to manipulate via computer. The reduced cost of information processing drives increasing productivity in a snowballing effect, because product designs, manufacturing processes, resource scheduling, administrative chores, and many other factors, are made more efficient.
The declining prices and expanding capabilities of modern computers cause them to be applied to an ever increasing variety of applications. For some years now, inexpensive xe2x80x9cpersonal computersxe2x80x9d have been available for personal use at home or for the use of a single individual at a place of business. Although small, these machines provide capability that could have only been imagined not long ago.
Computing power and digital storage being as inexpensive as they are, it has become increasingly popular to create digital records of matter previously embodied in other formats. In particular, it has become popular to create digital records of visual images, such as photographs, drawings, and the like. A digital image comprises a matrix of discrete pixels, each of which may assume any one of a pre-defined set of values representing color or shade. A crude form of digital image is a black-and-white image in which each pixel may assume one of only two values: black or white. However, in most modern systems, black and white digital images usually contain gray-scale pixels, each represented as an integer from, e.g. 0 to 255. Where images are in color, pixel values similarly represent some color or shade of color.
Digital images may be originally created in digital form (e.g., on a computer), but are commonly converted from a non-digital medium to a digital form. Once in digital form, such images may be stored in digital computers, replicated with digital copying devices, edited using any of various editing tools, and transmitted over digital networks, such as the Internet. One common method of conversion to digital form is to scan a photograph, drawing or other image on a non-digital medium (such as paper), using a digital scanning device. Various commercially available digital scanners exist for this purpose. Such scanners may be, e.g., xe2x80x9cflatbedxe2x80x9d scanners, hand-held scanners, sheet-fed scanners, or of other designs.
When digital images are scanned from other media such as paper, defects in the image may be rendered in the digital format. One very common form of defect is that introduced by a crease in paper media. A crease may remove some of the ink or other coloring along the line of the crease, making it appear as a white or light-colored line on the digital image.
It is possible to repair the effects of a crease in a digitally scanned image by manually editing the image pixel-by-pixel, but this method can be extremely tedious. An unrecognized need exists for an automated method of repairing a digitally scanned image having crease or similar artifacts
A relatively long, narrow defect in a digital image is repaired by identifying an elongated area to be repaired, and by automatically calculating pixel color/shade values within the area to be repaired from pixel values in the vicinity of the perimeter of the elongated area.
In the preferred embodiment, a user identifies an elongated rectangle enclosing an area to be repaired on the image. The rectangle is preferably identified by first displaying the image on an interactive display of a computer system, by then selecting two points on the interactive display with a pointing device, the two points being opposite corners of the rectangle, and by then rotating, translating and/or resizing the rectangle as necessary to cover the area to be repaired on the image. The computer automatically generates the pixel coordinates of a pair of parallel lines constituting the opposite long sides of the rectangle. Each pixel in one line corresponds to a pixel in the opposite line, each such pair of corresponding pixels defining the endpoints of a line segment perpendicular to the long sides of the rectangle. The interior pixels of the rectangle are then filled by interpolating color values along each line segment from the color values of the endpoints. For simplicity, the phrase xe2x80x9ccolor valuexe2x80x9d as used herein shall be taken to include such attributes as shade., intensity or brightness in addition to hue, and in the case of black and white images, may include only shade without hue.
Since the method described above is not guaranteed to fill all pixels within the rectangular area, in an alternative embodiment, the computer system maintains a map of pixels filled and not filled while performing the method of the preferred embodiment, and after completion, performs an additional step of assigning to any unfilled pixels a value based on the average of all adjacent pixels.
In another alternative embodiment, a computer system could automatically identify suspect areas to be repaired, and the user could modify the areas and/or confirm repair of the areas.
For long, narrow defects, particularly those introduced by creasing, the automated digital image repair method herein described generally produces images without significant visually noticeable defects, and does so without undue effort on the part of the user.
The details of the present invention, both as to its structure and operation, can best be understood in reference to the accompanying drawings, in which like reference numerals refer to like parts, and in which: